// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package flatbuf

import (
	flatbuffers 
)

// / ----------------------------------------------------------------------
// / A field represents a named column in a record / row batch or child of a
// / nested type.
type Field struct {
	_tab flatbuffers.Table
}

func ( []byte,  flatbuffers.UOffsetT) *Field {
	 := flatbuffers.GetUOffsetT([:])
	 := &Field{}
	.Init(, +)
	return 
}

func ( *Field) ( []byte,  flatbuffers.UOffsetT) {
	._tab.Bytes = 
	._tab.Pos = 
}

func ( *Field) () flatbuffers.Table {
	return ._tab
}

// / Name is not required, in i.e. a List
func ( *Field) () []byte {
	 := flatbuffers.UOffsetT(._tab.Offset(4))
	if  != 0 {
		return ._tab.ByteVector( + ._tab.Pos)
	}
	return nil
}

// / Name is not required, in i.e. a List
// / Whether or not this field can contain nulls. Should be true in general.
func ( *Field) () bool {
	 := flatbuffers.UOffsetT(._tab.Offset(6))
	if  != 0 {
		return ._tab.GetBool( + ._tab.Pos)
	}
	return false
}

// / Whether or not this field can contain nulls. Should be true in general.
func ( *Field) ( bool) bool {
	return ._tab.MutateBoolSlot(6, )
}

func ( *Field) () Type {
	 := flatbuffers.UOffsetT(._tab.Offset(8))
	if  != 0 {
		return Type(._tab.GetByte( + ._tab.Pos))
	}
	return 0
}

func ( *Field) ( Type) bool {
	return ._tab.MutateByteSlot(8, byte())
}

// / This is the type of the decoded value if the field is dictionary encoded.
func ( *Field) ( *flatbuffers.Table) bool {
	 := flatbuffers.UOffsetT(._tab.Offset(10))
	if  != 0 {
		._tab.Union(, )
		return true
	}
	return false
}

// / This is the type of the decoded value if the field is dictionary encoded.
// / Present only if the field is dictionary encoded.
func ( *Field) ( *DictionaryEncoding) *DictionaryEncoding {
	 := flatbuffers.UOffsetT(._tab.Offset(12))
	if  != 0 {
		 := ._tab.Indirect( + ._tab.Pos)
		if  == nil {
			 = new(DictionaryEncoding)
		}
		.Init(._tab.Bytes, )
		return 
	}
	return nil
}

// / Present only if the field is dictionary encoded.
// / children apply only to nested data types like Struct, List and Union. For
// / primitive types children will have length 0.
func ( *Field) ( *Field,  int) bool {
	 := flatbuffers.UOffsetT(._tab.Offset(14))
	if  != 0 {
		 := ._tab.Vector()
		 += flatbuffers.UOffsetT() * 4
		 = ._tab.Indirect()
		.Init(._tab.Bytes, )
		return true
	}
	return false
}

func ( *Field) () int {
	 := flatbuffers.UOffsetT(._tab.Offset(14))
	if  != 0 {
		return ._tab.VectorLen()
	}
	return 0
}

// / children apply only to nested data types like Struct, List and Union. For
// / primitive types children will have length 0.
// / User-defined metadata
func ( *Field) ( *KeyValue,  int) bool {
	 := flatbuffers.UOffsetT(._tab.Offset(16))
	if  != 0 {
		 := ._tab.Vector()
		 += flatbuffers.UOffsetT() * 4
		 = ._tab.Indirect()
		.Init(._tab.Bytes, )
		return true
	}
	return false
}

func ( *Field) () int {
	 := flatbuffers.UOffsetT(._tab.Offset(16))
	if  != 0 {
		return ._tab.VectorLen()
	}
	return 0
}

// / User-defined metadata
func ( *flatbuffers.Builder) {
	.StartObject(7)
}
func ( *flatbuffers.Builder,  flatbuffers.UOffsetT) {
	.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(), 0)
}
func ( *flatbuffers.Builder,  bool) {
	.PrependBoolSlot(1, , false)
}
func ( *flatbuffers.Builder,  Type) {
	.PrependByteSlot(2, byte(), 0)
}
func ( *flatbuffers.Builder,  flatbuffers.UOffsetT) {
	.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(), 0)
}
func ( *flatbuffers.Builder,  flatbuffers.UOffsetT) {
	.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(), 0)
}
func ( *flatbuffers.Builder,  flatbuffers.UOffsetT) {
	.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(), 0)
}
func ( *flatbuffers.Builder,  int) flatbuffers.UOffsetT {
	return .StartVector(4, , 4)
}
func ( *flatbuffers.Builder,  flatbuffers.UOffsetT) {
	.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(), 0)
}
func ( *flatbuffers.Builder,  int) flatbuffers.UOffsetT {
	return .StartVector(4, , 4)
}
func ( *flatbuffers.Builder) flatbuffers.UOffsetT {
	return .EndObject()
}